package cn.javaee.springmvc.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class test {

    @RequestMapping("/test")
    public String test(){

           String s = test2("1");


       String b="99999";
        return b;
    }

    public String test2(String a){
        if (a.equals("1"))
            throw new RuntimeException("抛出异常");

        return "2333";
    }
    public String test3(String a)throws Exception{
        if (a.equals("1"))
            throw new RuntimeException("抛出异常");

        return "2333";
    }
}
